#pragma once

#include <compl.h>
/* 实现内存的基本分配 */


SAI void*	page_alloc	(size_t size);
SAI bool_t	page_free	(void *ptr, size_t sz);
SAI void	mark_unused_pages	(void *ptr, size_t sz);
SAI void*	mark_hugepage	(void *ptr, unsigned long size, const int hugepage_lvl);
/* 实现一个小型的对象分配 */


/* 包含实现 */

#if defined (__unix__) || defined(__APPLE__) || defined (__MINGW32__)
    #include <sys/types.h>
    #include <sys/mman.h>
    #include <unix/page_alloc_os.h>
#else
    #error "unsupported os for [alloc handler]"
#endif
